Cavern

 Cavern4D

 Cavernize

 Debug

 FilterInterfaces

 Filters

 Format

  Common

  Consts

  Container

  Decoders

  Environment

  FilterSet

  Renderers

  Transcoders

  Utilities

  AudioFormat

  AudioReader

  AudioReader(Stream)

  AudioReader(string)

  Bits

  BlockTest(byte[])

  ChannelCount

  Dispose()

  filter

  GetRenderer()

  Length

  Open(Stream)

  Open(string)

  Path

  Read()

  ReadAfterHeader()

  ReadBlock(float[], long, long)

  ReadBlock(float[][], long, long)

  ReadClip()

  ReadClip(Stream)

  ReadClip(string)

  ReadClipAfterHeader()

  reader

  ReadHeader()

  ReadMultichannel()

  ReadMultichannelAfterHeader()

  Reset()

  RollingBlockCheck(byte[], byte[])

  SampleRate

  Seek(long)

  AudioTrackReader

  AudioWriter

  BitDepth

  EnhancedAC3Reader

  LAFMode

  LimitlessAudioFormatReader

  LimitlessAudioFormatWriter

  RIFFWaveReader

  RIFFWaveWriter

  SegmentedAudioReader

  SegmentedAudioWriter

 Helpers

 QuickEQ

 Remapping

 SpecialSources

 Spoofer

 Utilities

 Virtualizer

 Atmosphere

 AudioClip3D

 AudioListener3D

 AudioListener3DInspector

 AudioSource3D

 CavernizeRealtime

 Channel

 Clip

 Environments

 Jack

 Listener

 QualityModes

 Rolloffs

 SeatAdaptation

 Source

class AudioReader

Abstract audio file reader.
VisibilityPublic
Modifiersabstract
ExtendsIDisposable

Public functions

Constructor AudioReader(Stream reader) Abstract audio file reader.
Constructor AudioReader(string path) Abstract audio file reader.
void Dispose() Close the reader.
float[] Read()Read the entire file, including the header, and get the data.
float[] ReadAfterHeader()Read the entire file, and get the data. The header should have been read before.
void ReadBlock(float[][] samples, long from, long to)Read a block of samples to a multichannel array.
Clip ReadClip()Read the entire file, including the header, and pack it in a Clip.
Clip ReadClipAfterHeader() Read the entire file and pack it in a Clip. The header should have been read before.
float[][] ReadMultichannel()Read the entire file, including the header.
float[][] ReadMultichannelAfterHeader()Read the entire file. The header should have been read before.
void Reset()Goes back to a state where the first sample can be read.

Public static functions

AudioReader Open(Stream reader)Open an audio stream for reading. The format will be detected automatically.
AudioReader Open(string path) Open an audio file for reading by file name. The format will be detected automatically.
Clip ReadClip(Stream reader) Open an audio clip from a stream. The format will be detected automatically.
Clip ReadClip(string path) Open an audio clip by file name. The format will be detected automatically.

Protected functions

void BlockTest(byte[] block)Tests if the next byte block is as expected, throws an exception if it's not.
bool RollingBlockCheck(byte[] cache, byte[] block)Tests if the next rolling byte block is as expected, if not, it advances by 1 byte.

Public properties

BitDepth BitsContent bit depth.
int ChannelCountContent channel count.
long LengthContent length in samples for a single channel.
string Path Path to the opened file or null if the audio is not read from a file.
int SampleRateContent sample rate.

Public variables

string filterFilter to all supported file types for open file dialogs. These are the containers supported by Open(string).
Renderer GetRenderer()Get an object-based renderer for this audio file.
void ReadBlock(float[] samples, long from, long to)Read a block of samples.
void ReadHeader()Read the file header.
void Seek(long sample)Start the following reads from the selected sample.

Protected variables

Stream readerFile reader object.